<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      body {
        color: #333;
        width: 100vw;
        height: 100vh;
        background: #eee;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      div {
        font-weight: bold;
        text-transform: uppercase;
        font-size: 8em;
      }
      span.hover {
        cursor: pointer;
        display: inline-block;
        animation-name: hoverAnimation;
        animation-duration: 0.8s;
        animation-delay: 0.2s;
        animation-direction: alternate;
        /* animation: name duration timing-function delay iteration-count direction fill-mode; */
      }
      @keyframes hoverAnimation {
        50% {
          transform: scale(1.8);
          color: red;
          opacity: 0.56;
        }
        100% {
          transform: scale(1);
          opacity: 1;
          color: #000;
        }
      }
    </style>
  </head>
  <body>
    <div>houdunren.com</div>
    <script>
      const div = document.querySelector("div");
      // console.log([...div.textContent]);
      [...div.textContent].reduce((prev, cur, index) => {
        if (prev === 0) {
          div.innerHTML = "";
        }
        const span = document.createElement("span");
        span.innerHTML = cur;
        div.appendChild(span);
        span.addEventListener("mouseover", () => {
          span.classList.add("hover");
        });
        span.addEventListener("animationend", () => {
          span.classList.remove("hover");
        });
      }, 0);
    </script>
  </body>
</html>
